var mychart = echarts.init(document.getElementById("b1"));

var option ={
    series:{
        type:'pie',
        data:[1,2,3],
    },
    title:{
        text:'成绩占比',
        subtext:'沈林涛',
    },
};
mychart.setOption(option)

var myChart2 = echarts.init(document.getElementById("b2"));
    var option2 ={
        title:{
            text:'成绩占比',
            subtext:'沈林涛',
            left:'center',
            bottom:'2%',
            textStyle:{
                color: 'red',
                fontStyle:'italic',
            },
        },
        legend: {},
        series:{
            type:'pie',
            data:[{
                value: 1,
                name: '优',
            },{
                value: 3,
                name: '良',
            },{
                value: 4,
                name: '中',
            },{
                value: 2,
                name: '差',
            }],
        },
    };
    myChart2.setOption(option2);

    var myChart3 = echarts.init(document.getElementById("b3"));
    var option3 ={
        title:{
            text:'成绩占比',
            subtext:'沈林涛',
            left:'center',
            bottom:'2%',
            textStyle:{
                color: 'red',
                fontStyle:'italic',
            },
        },
        legend: {},
        series:{
            type:'pie',
            data:[{
                value: 1,
                name: '优',
            },{
                value: 3,
                name: '良',
            },{
                value: 4,
                name: '中',
            },{
                value: 2,
                name: '差',
            }],
        },
    };
    myChart3.setOption(option3);

    var myChart4 = echarts.init(document.getElementById("b4"));
    var option4 ={
        title:{
            text:'成绩占比',
            subtext:'沈林涛',
            left:'center',
            bottom:'2%',
            textStyle:{
                color: 'red',
                fontStyle:'italic',
            },
        },
        legend: {},
        series:{
            type:'pie',
            data:[{
                value: 1,
                name: '优',
            },{
                value: 3,
                name: '良',
            },{
                value: 4,
                name: '中',
            },{
                value: 2,
                name: '差',
            }],
            label:{
                color:'black',
                position:'inner',
            },
        },
    };
    myChart4.setOption(option4);

    var myChart5 = echarts.init(document.getElementById("b5"));
    var option5 ={
        title:{
            text:'成绩占比--圆环图',
            subtext:'沈林涛',
            left:'center',
            bottom:'2%',
            textStyle:{
                color: 'red',
                fontStyle:'italic',
            },
        },
        legend: {
            left: 'center',
            top: 'bottom',
        },
        tooltip: {
            formatter: '{b}:{c}({d}%)',
        },
        series:{
            type:'pie',
            radius: ['60%','85%'],
            data:[{
                value: 1,
                name: '优',
            },{
                value: 3,
                name: '良',
            },{
                value: 4,
                name: '中',
            },{
                value: 2,
                name: '差',
            }],
            label:{
                color:'black',
                position:'inner',
            },
        },
    };
    myChart5.setOption(option5);

    var myChart6 = echarts.init(document.getElementById("b6"));
    var option6 ={
        title:{
            text:'成绩占比--南丁格尔图',
            subtext:'沈林涛',
            left:'center',
            bottom:'2%',
            textStyle:{
                color: 'red',
                fontStyle:'italic',
            },
        },
        legend: {
            left: 'left',
            top: 'bottom',
        },
        tooltip: {
            formatter: '{b}:{c}({d}%)',
        },
        series:{
            type:'pie',
           // radius: ['60%','85%'],
           roseType: true,
            data:[{
                value: 1,
                name: '优',
            },{
                value: 3,
                name: '良',
            },{
                value: 4,
                name: '中',
            },{
                value: 2,
                name: '差',
            }],
            label:{
                color:'black',
                position:'inner',
            },
        },
    };
    myChart6.setOption(option6);

    var myChart7 = echarts.init(document.getElementById("b7"));
    var option7 = {
        series:[{
            type:'pie',
            center: ["25%","50%"],
            radius: [0,"40%"],
            data:[{
                value: 1,
                name: '优',
            },{
                value: 3,
                name: '良',
            },{
                value: 2,
                name: '差',
            }],
            label:{
                color:'black',
                position:'inner',
            },
        },{
            type:'pie',
            center:["75%","50%"],
            radius: [0,"40%"],
            data:[{
                value: 1,
            },{
                value: 3,
            },{
                value: 2,
                name: '差',
            }],
        }]
    };
    myChart7.setOption(option7);

    var myChart8 = echarts.init(document.getElementById("b8"));
    var idata = [1];
    var option8 = {
        series:[{
            type:'pie',
            data:idata,
            label:{
                position:'inside',
            },
        }]
    };
    myChart8.setOption(option8);
    var i = 0;
    setInterval(function(){
         if(idata.length>60){
             idata = [];
            //  clearInterval(myInterval);
         } else {
             idata.push({
                 value:idata.length,
                 name:String(idata.length),
             });
             option8.series[0].data = idata;
             myChart8.setOption(option8);
         }
    },100);
    var myChart9 = echarts.init(document.getElementById("b9"));
    var i2data = 0;
    var option9 ={
        title: {
            text: '0',
            left: 'center',
            bottom: "45%",
            textStyle:{
                color: 'white',
            },
        },
        series:[{
            type:'pie',
            radius:["80%","85%"],
            data:[1],
            label:{
                show:false,
            },
            itemStyle:{
                color:'black',
            },
        },{
            type:'pie',
            radius:["60%","65%"],
            data:[{
                value: 1,
                name: i2data,
            }],
            itemStyle:{
                color:'red',
            },
            label: {
                show:false,
            },
        },{
            type:'pie',
            radius:["70%","75%"],
            startAngle:270,
            data:[1,1],
            label: {
                show:false,
            },
        }]
    };
    myChart9.setOption(option9)
    setInterval(function(){
        if(i>60){
            i = 0;
           //  clearInterval(myInterval);
        } else {
            option9.series[2].startAngle = option9.series[2].startAngle - 6;
            option9.title.text = String(i);
            i++;
            myChart9.setOption(option9);
        }
   },1000);


//具有涟漪效果的气泡图
function getRndInteger(min, max) {
    return Math.floor(Math.random() * (max - min) ) + min;
}

var myChart10 = echarts.init(document.getElementById("b10"));

function dataChange(){ 
    //先生成模拟的数据 
    var data=[];
    var x,y,z;
    for(var i=0;i<50;i++){
        x=getRndInteger(1,100);
        y=getRndInteger(1,100);
        z=getRndInteger(2,30);
        data.push([x,y,z]);
    }
    
    var option10 = {
        xAxis: {},
        yAxis: {},
        title: {
            text: '动态气泡图',
            left: 'center',
        },
        series: [{
            type:'scatter',
            color:"black",
            data:data,
            symbolSize: function(valuex){
                return valuex[2];
            },
        }],
            
    };
    //更新数据
    myChart10.setOption(option10);
}

//画出第一个初始化的图
dataChange();
//之后定期更新
setInterval(function(){dataChange();},3000);


//摘自https://gitee.com/blackdusts/study-code/blob/master/dataVisualization/js/otherBasicf/bubblef4.js
//你的代码